package cn.sola.push.frame;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author: kangxiaohui
 * @date：2017年12月20日 上午9:10:43
 * @version 1.0 
 * 消息队列测试
 * jdeis 和 org\springframework\data\spring-data-redis\1.8.4.RELEASE 版本要协调   Unsupported major.minor version 52.0
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:push/redis-push.xml")
public class RedisPush {

	@Resource(name = "redisTemplate")
	private RedisTemplate<String, Object> redisTemplate;
	
	@Test
	public void index(){
		System.out.println(redisTemplate);
	}
	
	@Test
	public void testSendMessage(){
		redisTemplate.convertAndSend("sola", "this is a good");
	}
	
	@Test
	public void testAcceptMessage(){
	}
}
